﻿using System;
using System.Configuration;

namespace StoneAge.Infrastructure.Configuration
{
    public class WebConfigApplicationSettings : IApplicationSettings
    {
        public string LogConfigFilePath
        {
            get { return AppDomain.CurrentDomain.BaseDirectory + "config/log4net.cfg.xml"; }
        }

        public string NHibernateConfigFilePath
        {
            get { return AppDomain.CurrentDomain.BaseDirectory + "config/hibernate.cfg.xml"; }
        }

        public string LogName
        {
            get { return ConfigurationManager.AppSettings["logger_name"]; }
        }

        public int SessionValidTime
        {
            get { return Convert.ToInt32(ConfigurationManager.AppSettings["session_valid_time"]); }
        }

        public int SaveRoleTick
        {
            get { return Convert.ToInt32(ConfigurationManager.AppSettings["save_role_tick"]); }
        }

        public string MapAreaImageSrcFormat
        {
            get { return ConfigurationManager.AppSettings["map_area_image_src_format"]; }
        }
    }
}
